home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / Vk / VkAction.z / VkAction
Encoding:
Text File  |  2002-10-03  |  5.2 KB  |  133 lines

  1.  
  2.  
  3.  
  4. VVVVkkkkAAAAccccttttiiiioooonnnn((((3333xxxx))))                                                      VVVVkkkkAAAAccccttttiiiioooonnnn((((3333xxxx))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      VkAction - Supports encapsulation of a command that can be undone
  10.  
  11. HHHHEEEEAAAADDDDEEEERRRR FFFFIIIILLLLEEEE
  12.      #include <Vk/VkAction.h>
  13.  
  14. PPPPUUUUBBBBLLLLIIIICCCC PPPPRRRROOOOTTTTOOOOCCCCOOOOLLLL SSSSUUUUMMMMMMMMAAAARRRRYYYY
  15.    CCCCoooonnnnssssttttrrrruuuuccccttttoooorrrr////DDDDeeeessssttttrrrruuuuccccttttoooorrrr
  16.            VkAction(const char*);
  17.            virtual void ~VkAction(void);
  18.  
  19.  
  20.    EEEExxxxeeeeccccuuuuttttiiiinnnngggg aaaaccccttttiiiioooonnnnssss
  21.           void execute(void);
  22.  
  23.  
  24. PPPPRRRROOOOTTTTEEEECCCCTTTTEEEEDDDD PPPPRRRROOOOTTTTOOOOCCCCOOOOLLLL SSSSUUUUMMMMMMMMAAAARRRRYYYY
  25.    SSSSppppeeeecccciiiiffffyyyyiiiinnnngggg ddddoooo////uuuunnnnddddoooo BBBBeeeehhhhaaaavvvviiiioooorrrr
  26.            virtual void doit(void);
  27.            virtual void undoit(void);
  28.  
  29.  
  30.    PPPPrrrrooootttteeeecccctttteeeedddd DDDDaaaattttaaaa MMMMeeeemmmmbbbbeeeerrrrssss
  31.           char* _name;
  32.  
  33.  
  34. CCCCLLLLAAAASSSSSSSS DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  35.           This class supports applications that wish to model undoable actions
  36.           as objects. Applications must create derived classes that define the
  37.           exact actions to be taken. Applications use classes derived from
  38.           VkAction by instantiating an instance of a class and calling the
  39.           object's _e_x_e_c_u_t_e() member function. The object automatically
  40.           registers itself with the application's undo manager, which provides
  41.           the interface for undoing the command.
  42.  
  43.  
  44.  
  45. DDDDEEEERRRRIIIIVVVVIIIINNNNGGGG SSSSUUUUBBBBCCCCLLLLAAAASSSSSSSSEEEESSSS
  46.           To use this class, an application must create a derived class for
  47.           every type of action it wishes to perform. Each derived class must
  48.           override the virtual functions _d_o_i_t() and _u_n_d_o_i_t(). The derived
  49.           class can add data members to maintain any state required between
  50.           doing the command and undoing the command.
  51.  
  52.  
  53.  
  54. FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNN DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNNSSSS
  55.    ddddooooiiiitttt(((())))
  56.           virtual void doit(void);
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. VVVVkkkkAAAAccccttttiiiioooonnnn((((3333xxxx))))                                                      VVVVkkkkAAAAccccttttiiiioooonnnn((((3333xxxx))))
  71.  
  72.  
  73.  
  74.           This virtual function should be overridden to provide the action to
  75.           be performed by the derived class.
  76.  
  77.    uuuunnnnddddooooiiiitttt(((())))
  78.           virtual void undoit(void);
  79.  
  80.  
  81.           This virtual function should be overridden to reverse the effects of
  82.           the action performed by the derived class.
  83.  
  84.    VVVVkkkkAAAAccccttttiiiioooonnnn(((())))
  85.           VkAction(const char* name);
  86.  
  87.  
  88.           Initialize a VkAction object.
  89.  
  90.    ~~~~VVVVkkkkAAAAccccttttiiiioooonnnn(((())))
  91.           virtual void ~VkAction(void);
  92.  
  93.  
  94.           Handle destruction of a VkAction object.
  95.  
  96.    eeeexxxxeeeeccccuuuutttteeee(((())))
  97.           void execute(void);
  98.  
  99.  
  100.           Calls derived classes' _d_o_i_t() method and arranges for the undo
  101.           action to be registered with the undo manager.
  102.  
  103. DDDDAAAATTTTAAAA MMMMEEEEMMMMBBBBEEEERRRR DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNNSSSS
  104.    ____nnnnaaaammmmeeee
  105.           char* _name;
  106.  
  107.  
  108.           Every action should have a name, which is used to identify the
  109.           action in the undo manager.
  110.  
  111. CCCCLLLLAAAASSSSSSSSEEEESSSS UUUUSSSSEEEEDDDD BBBBYYYY TTTTHHHHIIIISSSS CCCCLLLLAAAASSSSSSSS
  112.      VkMenuUndoManager
  113.  
  114. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  115.      VkMenuUndoManager
  116.      _V_i_e_w_K_i_t _P_r_o_g_r_a_m_m_e_r'_s _G_u_i_d_e
  117.      _T_h_e _X _W_i_n_d_o_w _S_y_s_t_e_m, DEC Press, Bob Sheifler and Jim Gettys
  118.      _T_h_e _X _W_i_n_d_o_w _S_y_s_t_e_m _T_o_o_l_k_i_t, DEC Press, Paul Asente and Ralph Swick
  119.      _T_h_e _O_S_F/_M_o_t_i_f _P_r_o_g_r_a_m_m_e_r_s _R_e_f_e_r_e_n_c_e, Prentice Hall, OSF
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.